/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.assignment2.lspobey.Impl;

/**
 *
 * @author Siya
 */
public class OverTime {
 
    private double rate;
    private int afterWorkHours;
    private static final int WORKHOURS = 9;
    
    public OverTime(){        
          
    }
    public OverTime(int rt){
        
        rate = rt;
    
    }

    
    /**
     * @return the rate
     */
    public double getRate() {
        return rate;
    }

    /**
     * @param rate the rate to set
     */
    public void setRate(double rate) {
        this.rate = rate;
    }
    public double salary(){
        
        return rate * (WORKHOURS + getAfterWorkHours());
    }

    /**
     * @return the afterWorkHours
     */
    public int getAfterWorkHours() {
        return afterWorkHours;
    }

    /**
     * @param afterWorkHours the afterWorkHours to set
     */
    public void setAfterWorkHours(int afterWorkHours) {
        this.afterWorkHours = afterWorkHours;
    }
}
